import 'package:flutter/material.dart';
import '../../../lib_basemodel/chat_room/kh_chat_room_enter_model.dart';
import '../../../lib_baseview/widget/dialogs.dart';
import 'root_proxy_model.dart';

mixin RoomSettingMixin {
  // List<BackgroundItem> backgroundAssetsList = RoomConfig.hallBackgroundList;
  String defaultBackgroundAssets = "assets/images/bg_chat_room_1.png";

  ///用作座位框设置临时存储  MicSettingItem设置的item 对应position
  // Map<int, MicSettingItem> changedItemsMap = <int, MicSettingItem>{};

  /// MicResourceConfigItem座位框item 不对应position
  // Map<int, MicResourceConfigItem> changedItemConfigMap =
  //     <int, MicResourceConfigItem>{};

  KHChatRoomEnterModel? get roomEnterModel;

  void notifyListeners();

  /// 自由上麦
  switchFreePub(BuildContext context) async {
    await showToast("result.errorMsg ??");
    // bool changeTo = !(channel?.freePub ?? false);
    // var fields = ChannelFields.create()..freePub = changeTo;
    // var result = await RtcApi.instance.updateChannel(ChannelUpdate.create()
    //   ..channel = channel?.channelId ?? $fixnum.Int64(0)
    //   ..fields = fields);
    // if (!result.isSuccess) {
    //   await showToast(result.errorMsg ?? "");
    // }
  }
}
